package com.atguigu.lease;

import com.atguigu.lease.common.minio.MinioConfig;
import io.minio.MinioClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

@ComponentScan(excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,
        classes = MinioConfig.class ))
@SpringBootApplication
public class AppWebApplication {
    public static void main(String[] args) {
        SpringApplication.run(AppWebApplication.class, args);
    }
}

/**
 * 自定义的配置类不想加载：
 *   方案1： 正常给人家添加属性
 *   方案2： @ComponentScan 排除指定类 ==> 一般用这个
 *   方案3： 条件化注入 @ConditionalOnProperty(prefix = "minio", name = "endpoint")
 */